<?php

namespace app\modules\v1\controllers;

use Yii;
use yii\rest\ActiveController;

class TokenController extends ActiveController
{
    public $modelClass = '';
    
    public function actions(){
        
        $actions = parent::actions();
        
        unset($actions['index'],$actions['create'],$actions['delete'],$actions['view'],$actions['update']);
        
    }
    
    public function actionIndex(){
        
        return json_encode(['token' => Yii::$app->params['token']]);
        
    }
    
}

